package com.xxx.shetuan3.error;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

@RequestMapping("/error")
@RestController
public class myErrorController implements ErrorController   {
    /*
    @Override
    public String getErrorPath() {
        return null;
    }
    @RequestMapping
    public Map<String,Object> handleError(){
        Map<String,Object> map = new HashMap<>();
        map.put("code","404");
        map.put("msg","不存在");
        return map;
    }
    @RequestMapping("/ok")
    @ResponseBody
    public Map<String,Object> ok(){
        Map<String,Object> map = new HashMap<>();
        map.put("code","200");
        map.put("msg","ok");
        return map;
    }


     */

}
